Skip to content

Notebook redesign 3: the axes step shows the data as the roles read it; pixel size in one line - #272

Merged
guijacquemet merged 4 commits into
mainfrom
claude/redesign-3-axes
Nov 10, 2026
Merged

guijacquemet merged 4 commits into
mainfrom
claude/redesign-3-axes

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Third of four stacked pull requests (base: #270). Owner's test of v0.5.0, items (e) "the axis step must show an example of the data as interpreted by the chosen roles" and (f) "pixel sizes are too complex: handle them with the axes", with the owner's later requirement for (f): one pixel size for the whole experiment by default, a per-imaging-unit menu, and a clear line when the headers disagree. Design note: docs/restart/designs/notebook-redesign-2026-11-10.md on MorphoFeature branch claude/restart-doc.

The shipped notebook has 12 steps: Pixel sizes is part of Axes.

Summary

  • axis_example (new, pure) chooses the planes: one tile per channel labelled c=… (six evenly spread beyond six), a few time points t=… or depth slices z=…, or the single plane; each row is read at the sliders' position of the other axes. notebook_plots.example_png draws them with their true proportions and their height and width, so a wrong role looks wrong.
  • notebook_axis_step / notebook_axis_preview: the example is drawn by the folder check itself and redrawn for every role change (the tick is taken back, as before). The role boxes and the example sit side by side; the image chooser and the sliders are under Another image, or other planes. Show preview is hidden (the button still works for bricks that click it). The planes are read exactly as the preview read them: with the roles being edited, only the image as the folder check read it (fingerprint before and after), labelled not confirmed yet.
  • The confirmation is unchanged and explicit: Yes, the example looks right then Confirm axis roles, or the one-click Confirm these axes under the same conditions as before (owner decision Q3). notebook_axes_quick: the Suggested axes card and the Look closer fold are gone; while the one click is offered it replaces the tick and the button, under the always-visible role boxes and example.
  • pixel_size_summary (new, pure) and notebook_calibration: the card is one line, "Pixel size: 0.108 × 0.108 µm (from the headers, same in all 270 images)". With no size in the headers there is one input and Use for all images; with one, the input is behind Change the pixel size…. When the images do not agree: "Headers disagree: 0.108 × 0.108 µm in 180 images, 0.216 × 0.216 µm in 90 (Condition_2/Biological_repeat_2)", and Set per imaging unit… opens by itself: the size of each folder, and the existing form to state a size for a folder or an image.
  • notebook_steps / notebook_step_states: 12 steps; the axes chip carries the pixel-size note (✓ 2 Axes · uncalibrated).
  • Texts no longer carry step numbers after step 3 ("the run can start", "on Image type"), so they stay right when steps merge. Tests updated accordingly.

Decisions

  • Nothing about calibration rules changes. A stated size is a calibration.csv statement for ., a folder or an image, written by the calibrate functions under the lock; the most specific applies; the manifest records each image's size with its source (header, stated, pixels, none). The experiment description holds no pixel size (Spec experiment-v1 forbids the field), so the Spec forces nothing here.
  • Never a silent choice. Headers that disagree are each recorded as their header says until the user states otherwise. Use for all images is the user's explicit statement for every image: it writes . for X and Y and removes X and Y statements of single folders and images (they would otherwise still win); Z statements are kept. A stated size that differs from a header is still warned about (calibration_differs_from_header).
  • No size and nothing stated stays uncalibrated (the chip says so); nothing is required and nothing is guessed.
  • The example reads up to six channel planes and four time points or slices of one image (reduced by the existing preview reader) on every role change.

Notes for review

  • With roles that put Y or X on an axis that is not a plane of the TIFF pages, no example can be read; the card says why ("This plane cannot be shown with these roles") instead of drawing a strip. The strip is drawn when the reader can read such planes.
  • Embedded axis_step() (other bricks) gets the same layout and the automatic example; the pixel size card stays in their folder_step().
  • Looked at in headless Chromium at 1366 x 768 and 1920 x 1080, not in Google Colab.

Tests

python tools/check.py on the head: see the comment below for the numbers. New: tests/test_notebook_axes_example.py (20): which planes are shown and their labels, the picture, each pixel-size line (one size, none, pixels, disagreeing headers with counts and folders, header and stated), the per-unit rows, the example drawn by the check and redrawn on a role change, the planes it reads, one input for all, a wrong size refused, disagreeing headers left as they are, a per-unit statement then one for all.


Generated by Claude Code

…d it; pixel size in one line

Owner test of v0.5.0 (10 November 2026), items (e) and (f); the per-unit pixel size menu.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc

Copy link
Copy Markdown
Contributor Author

Gate: python tools/check.py on 71191f5 (main merged through #270): Ruff and the code rules pass; 5230 passed, 4 skipped (test_cli_log.py:166, test_folder_rules.py:199 and :230: a file system that tells names apart by case; test_discovery.py:665: running with permissions that ignore file modes).

The stack is #269, #270, #272 (this), #273.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc


Generated by Claude Code

…n-3-axes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
The one-size-for-all statement removed the X and Y statements of single folders and images
(and overrode the header sizes) at the first click, without naming them. It now lists the
statements it removes or replaces and the sizes the images have now, and writes only after
Replace them; under the lock it refuses when calibration.csv changed since they were shown.
With nothing to replace it writes at once, as before. Regression tests in
tests/test_notebook_axes_example.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Base automatically changed from claude/redesign-2-progress to main November 10, 2026 19:23
@guijacquemet
guijacquemet merged commit b9f1408 into main Nov 10, 2026
14 checks passed
@guijacquemet
guijacquemet deleted the claude/redesign-3-axes branch November 10, 2026 19:24

Copy link
Copy Markdown
Contributor Author

Independent review, merged.

  • Main (Quiet the notebook output: no debug flood from ImageJ TIFFs #271, cee33dc) merged into the stack from the bottom up: only CHANGELOG.md conflicted, and both entries are kept. The _Attached/_ToRootWarnings changes in notebook_ui.py and the projection_marker.py change are the same as on main.
  • Fix 003e826: before this, Use for all images removed the X/Y statements of single folders and images, and overrode the header sizes, on the first click without naming them. Now it first lists the statements it removes or replaces and the sizes the images have now. It writes only after Replace them, and under the lock it refuses if calibration.csv changed after the list was shown. When there is nothing to replace, it writes at once. Three regression tests were added in tests/test_notebook_axes_example.py; two of them failed on 71191f5 + main.
  • Same answers on main cee33dc and on the stack: morphobricks.toml, plane_histograms.csv, experiment_design.csv, mask_relationships.json, mask_representation.json and calibration.csv are byte-identical. run_manifest.json differs only in the output path and written_at.
  • Gate: python tools/check.py on 003e826 passes Ruff and the code rules, with 5238 passed and 4 skipped (the four environment skips). CI is 14/14.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants